Hi there.
At first, I'm sorry for my poor english.
I trying to implementing simple custom shape. https://github.com/NativeMeta/LuxCoreRender_CustomShape
That is the instant method below.
1) Input custom shape data
- Currently, the custom shape data is parasitic on the definition of "scene.objects.*.ply" in the "*.scn" file.
2) Intercept ray intersection
- Any function.
3) Return intersection information
- Materials obtained at the time of input are diverted.
image of implemented sphere intersection result.
Something is indefinite, but it is under investigation.
Trying to implementing simple custom shape
-
- Posts: 10
- Joined: Sat Jul 21, 2018 7:05 pm
Re: Trying to implementing simple custom shape
I'm not sure to understand exactly the question.
LuxCore support a pre-processing step where you can transform any kind of input in a triangle mesh. For instance, this is used to transform and tessellate a hair file in a triangle mesh. Or to implement the "pointiness" feature.
This is by far the most simple way to add the support for some kind of new shape: you have only to implement the transformation to a triangle mesh step.
Adding the support for a new type of primitive to the core is a LOT more complex and is not even expected/planned. You have to modify a LOT of C++ and OpenCL C code. It is really a complex task.
LuxCore support a pre-processing step where you can transform any kind of input in a triangle mesh. For instance, this is used to transform and tessellate a hair file in a triangle mesh. Or to implement the "pointiness" feature.
This is by far the most simple way to add the support for some kind of new shape: you have only to implement the transformation to a triangle mesh step.
Adding the support for a new type of primitive to the core is a LOT more complex and is not even expected/planned. You have to modify a LOT of C++ and OpenCL C code. It is really a complex task.
-
- Posts: 10
- Joined: Sat Jul 21, 2018 7:05 pm
Re: Trying to implementing simple custom shape
Thank you for your reply.
Certainly the attributes supported by LuxCore are diverse and complicated.
Of course, as it will be completely independent from LuxCore's product.
The implementation of custom shapes seems unusual, I examined the SDK such as MentalRay, Maxwell etc, but there was no API to bypass the ray intersection.
Certainly the attributes supported by LuxCore are diverse and complicated.
Of course, as it will be completely independent from LuxCore's product.
The implementation of custom shapes seems unusual, I examined the SDK such as MentalRay, Maxwell etc, but there was no API to bypass the ray intersection.
-
- Posts: 10
- Joined: Sat Jul 21, 2018 7:05 pm
Re: Trying to implementing simple custom shape
I found out that the local coordinate system of the intersection position is indeterminate and fixed the bug, so I do not know if there is demand but post it.
https://github.com/NativeMeta/LuxCoreRender_CustomShape
sphere rendering
polyhedron rendering
Absolute value of difference
I'm sorry for my poor english.
https://github.com/NativeMeta/LuxCoreRender_CustomShape
sphere rendering
polyhedron rendering
Absolute value of difference
I'm sorry for my poor english.
-
- Posts: 10
- Joined: Sat Jul 21, 2018 7:05 pm
Re: Trying to implementing simple custom shape
#if CUSTOM_SHAPE_CODE
#else
#endif
Since it is enclosed by this, I think that it can be easily traced.
#else
#endif
Since it is enclosed by this, I think that it can be easily traced.
-
- Posts: 10
- Joined: Sat Jul 21, 2018 7:05 pm
Re: Trying to implementing simple custom shape
Hi there.
I made that possible to describe custom shapes restrictively with the syntax of the LuxCoreRender scene file.
It must be added at the end of the shape definition line.
https://github.com/NativeMeta/LuxCoreRender_CustomShape
I'm sorry for my poor English.
I made that possible to describe custom shapes restrictively with the syntax of the LuxCoreRender scene file.
It must be added at the end of the shape definition line.
https://github.com/NativeMeta/LuxCoreRender_CustomShape
I'm sorry for my poor English.