Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I add lights to an XML scene? #12

Open
ohmaya opened this issue Jun 1, 2023 · 2 comments
Open

How do I add lights to an XML scene? #12

ohmaya opened this issue Jun 1, 2023 · 2 comments

Comments

@ohmaya
Copy link

ohmaya commented Jun 1, 2023

Yeah, it might be a Mitsuba question.

I took scenes/classroom/scene.xml and added the following:

	<emitter type="point">
		<point name="position" value="-3.7, 5.0, 1.0"/>
		<rgb name="intensity" value="123456789.0"/>
	</emitter>
	<shape type="rectangle">
		<transform name="toWorld">
			<matrix value="0.53241 0 0 -1.47544 0 0.907794 1.78252e-008 1.18968 0 1.78252e-008 0.5 -1.26735 0 0 0 1"/>
		</transform>
		<bsdf type="twosided">
			<bsdf type="diffuse">
				<rgb name="reflectance" value="0, 0, 0"/>
			</bsdf>
		</bsdf>
		<emitter type="area">
			<rgb name="radiance" value="123456789.0, 123456789.0, 123456789.0"/>
		</emitter>
	</shape>

There didn't seem to be new lights in the rendering.

scenes\bedroom\scene.xml contains 2 area emitters, which do not seem to appear in renderings.

Also didn't see sphere:

	<shape type="sphere">
		<float name="radius" value="10"/>
		<transform name="toWorld">
			<translate x="-3.6" y="5.0" z="1.4"/>
		</transform>
		<ref id="Walls" />
	</shape>

Thanks.

@ohmaya
Copy link
Author

ohmaya commented Jun 2, 2023

Also added emitter to the FlagRed, didn't see any illumination.

	<shape type="obj" >
		<string name="filename" value="models/Mesh013.obj" />
		<transform name="toWorld" >
			<matrix value="1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1"/>
		</transform>
		<ref id="FlagRed" />
		<emitter type="area">
			<rgb name="radiance" value="123456789.0, 123456789.0, 123456789.0"/>
		</emitter>
	</shape>

@yuphin
Copy link
Owner

yuphin commented Jun 2, 2023

Currently most Mitsuba light types are not supported (actually only the directional one is supported). They'll be extended in time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants